<template>
  <div><el-breadcrumb separator="/">
      <el-breadcrumb-item :to="{ path: '/' }">我的工作平台 </el-breadcrumb-item>
      <el-breadcrumb-item><a href="/">修改个人资料</a></el-breadcrumb-item>
    </el-breadcrumb>
    <el-form label-width="100px" style="width: 500px;">
      <el-form-item label="用户名"><el-input v-model="this.user.name" disabled></el-input></el-form-item>
      <el-form-item label="用户名称"><el-input v-model="this.user.jueSe" disabled></el-input></el-form-item>
      <el-form-item label="请输入旧密码"><el-input show-password v-model="pwd1"></el-input></el-form-item>
      <el-form-item label="请输入新密码"><el-input show-password v-model="pwd2"></el-input></el-form-item>
      <el-form-item label="请确定新密码"><el-input show-password v-model="pwd3"></el-input></el-form-item>
      <el-form-item label="性别">
        <template>
  <el-radio v-model="radio" label="1">男</el-radio>
  <el-radio v-model="radio" label="2">女</el-radio>
  </template></el-form-item>
      <el-form-item label="年龄"><el-input v-model="age"></el-input></el-form-item>
      <el-form-item label="入职日期"><el-input disabled></el-input></el-form-item>
      <el-form-item label="辞职日期"><el-input disabled></el-input><!-- <template>
  <div class="block" >

    <el-date-picker
      v-model="date"
      type="date"
      placeholder="选择日期" style="width: 300px;">
    </el-date-picker>
  </div></template> --></el-form-item>
      <el-form-item label="联系电话"><el-input v-model="phone"></el-input></el-form-item>
      <el-form-item label="电子邮箱"><el-input v-model="email"></el-input></el-form-item>
      <el-form-item ><el-button @click='queding()'>保存修改</el-button><el-button @click='fanhui()'>取消</el-button></el-form-item>
    </el-form>
    </div>
</template>

<script>
  import axios from 'axios'
  export default{
    data(){
      return{
     /* user:this.$route.query.user, */
      user:{
        name:"",
        jueSe:''
      },
      pwd1:'',
      pwd2:'',
      pwd3:'',
      radio:'',
      age:'',
      date:'',
      phone:'',
      email:''
      }
    }
    ,methods:{
     queding:function(){
     var self=this
     if(!(this.pwd1==this.user.pwd)){
      this.$message('旧密码不正确')
      return
     }else if(this.pwd2!=this.pwd3){
      this.$message('两次密码输入不相同')
      return
     }else{
        this.$message('密码正确')
     }
     },
     fanhui:function(){
      this.$router.push('/')
     }
    }
  }
</script>

<style scoped="scoped">
  .el-input{
    width: 300px;
  }
  .el-form{
    margin-left: 300px;
  }
</style>
